package com.wtone.platform.gat.images.gat.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSort;
import com.github.xiaoymin.knife4j.annotations.ApiSort;
import com.wtone.platform.gat.images.gat.model.FaceListObject;
import com.wtone.platform.gat.images.gat.model.ResponseStatusListModeObject;
import com.wtone.platform.gat.images.gat.service.FaceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: aiLin
 * @Date: 2020/10/9 15:22
 * @desc: 人脸对象控制层
 */
@Api(tags = "人脸中心", value = "face api")
@ApiSort(7)
@RestController
@Slf4j
public class FaceController {

    @Autowired
    private FaceService faceService;

    @ApiOperation("批量人脸新增")
    @ApiOperationSort(value = 1)
    @RequestMapping(value = "/VIID/Faces", method = RequestMethod.POST, produces="application/json;charset=UTF-8")
    public ResponseStatusListModeObject addFace(@RequestBody  FaceListObject faceListObject){
        //log.info("/VIID/Faces:"+faceListObject.toString());
        return faceService.addFace(faceListObject);
    }

    @ApiOperation("批量人脸查询")
    @ApiOperationSort(value = 2)
    @RequestMapping(value = "/VIID/Faces", method = RequestMethod.GET, produces="application/json;charset=UTF-8")
    public ResponseStatusListModeObject seleteFace(
            @RequestParam(name = "FaceID",required = false) String FaceID,
            @RequestParam(name = "InfoKind",required = false) String InfoKind,
            @RequestParam(name = "IDType",required = false) String IDType,
            @RequestParam(name = "SourceID",required = false) String SourceID,
            @RequestParam(name = "DeviceID",required = false) String DeviceID,
            @RequestParam(name = "Name",required = false) String Name){
        return null;
    }
}
